﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MIMP.Core.Profile.Roles
{
    public enum RoleType { 
        isAdmin,//Администртор
        is_GM_Guard, //Grand Master хранитель
        is_M_Guard,// Master хранитель
        is_E_Guard, //Expert хранитель
        isNPC, //БОТ
        isTester //Тестер
    };
    public class UserRole
    {
        #region Fields
        private int Id;
        private string name;
        private string description;
        private List<RoleType> userRoleList;
        #endregion

        #region Public methods
        /// <summary>
        /// Проверка наличие роли
        /// </summary>
        /// <param name="userID"></param>
        /// <param name="role"></param>
        /// <returns></returns>
        public  bool HasRole(int userID, RoleType role)
        {
           return  userRoleList.Where(x => x == role).Count() > 0 ? true : false;
        }

        /// <summary>
        /// Добавить роль
        /// </summary>
        /// <param name="userID"></param>
        /// <param name="role"></param>
        /// <returns></returns>
        public  bool AddUserRole(int userID, RoleType role)
        {
            return false;
        }
        #endregion
    }
}
